<?php



class ProductMapBuilder implements MapBuilder {

	
	const CLASS_NAME = 'lib.model.map.ProductMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap(ProductPeer::DATABASE_NAME);

		$tMap = $this->dbMap->addTable(ProductPeer::TABLE_NAME);
		$tMap->setPhpName('Product');
		$tMap->setClassname('Product');

		$tMap->setUseIdGenerator(false);

		$tMap->addPrimaryKey('IDEN', 'Iden', 'VARCHAR', true, 20);

		$tMap->addColumn('PRODUCT_NAME', 'ProductName', 'LONGVARCHAR', true, null);

		$tMap->addColumn('PRODUCT_STATUS', 'ProductStatus', 'VARCHAR', true, 50);

		$tMap->addColumn('PRODUCT_TYPE', 'ProductType', 'VARCHAR', true, 50);

		$tMap->addColumn('PRODUCT_SIZE', 'ProductSize', 'VARCHAR', true, 50);

		$tMap->addColumn('COLOR_CODE', 'ColorCode', 'VARCHAR', true, 50);

		$tMap->addColumn('COLOR_NAME', 'ColorName', 'VARCHAR', true, 50);

		$tMap->addColumn('ARTICLE_CODE', 'ArticleCode', 'VARCHAR', true, 100);

		$tMap->addColumn('PRODUCT_UNIT', 'ProductUnit', 'VARCHAR', true, 50);

		$tMap->addColumn('PRODUCT_PACKAGE_UNIT', 'ProductPackageUnit', 'VARCHAR', true, 50);

		$tMap->addColumn('REORDER_QUANTITY', 'ReorderQuantity', 'DOUBLE', true, null);

		$tMap->addColumn('REMARKS', 'Remarks', 'LONGVARCHAR', true, null);

		$tMap->addForeignKey('SUPPLIER_IDEN', 'SupplierIden', 'VARCHAR', 'account_supplier', 'CONTACT_IDEN', true, 18);

	} 
} 